This invention relates to an apparatus for generating a shape having a contour filled in the interior of the contour by using the contour position in a two-dimensional area as input information, and is applicable to a color graphics display employing a raster scan CRT (cathode ray tube).
In the conventional filled shape generating apparatus, a shape is scanned in one direction to fill the interior of a contour in each scan from a point where a scan line intersects the contour to a next point where it intersects the contour again. However, this method is disadvantageous in that in case where the interior of the contour is filled by X-coordinate direction scanning of X-Y coordinates shown in FIG. 1, lattice dots, (2,7) to (7,7), (7,6), (7,4), (7,2) and (2,1) to (7,1) are undesireably filled due to the existence of particular dots P.sub.1 (1,7), P.sub.2 (6,6), P.sub.3 (4,4), P.sub.4 (6,2) and P.sub.5 (1,1). One method of filling an area containing these particular dots has been proposed in Japanese Patent Laid-Open No. Sho 55-10656 as "shape filling method and apparatus". In this proposed method, there are provided registers storing the X-coordinate positions of lattice dots, the number of the registers corresponding to the number of dots arranged in Y-coordinate direction. Whenever a series of coordinates positions of dots constituting a contour are generated, the X-coordinate position of a dot other than the particular dots is successively loaded in a register corresponding to the Y-coordinate position of the dot. When the register which has already been loaded is to be loaded again, the filling is carried out by inverting the dots between the coordinates positions of the previously loaded dot and the newly loaded dots. However, this method carries out an erroneous filling. For example, when there are plural areas to be filled separated in a Y-coordinate direction, such as a concave shape, filling operation is correctly returned to an original state (black or white) by the inversions of even times for a monochromatic image display. However, if the areas are filled with a color code for a color image display, an erroneous filling is carried out. This occurs because the filling operation is carried out in this method whenever a dot belonging to the contour is generated without considering the resultant entire contour. Further, the contour extending in X direction may be filled or not filled depending on the advancing directions of the contour before and after the extending contour, and so it is impossible to fill only the interior of the contour correctly. To obviate such a defect, there is proposed a method of filling in which only the contour is once stored in a working plane or memory, and intersecting points with the contour are obtained in a software manner for each scan line, and the areas are filled between the intersecting points after the entire contour is completed. This method is disclosed in an article; B. D. Ackland and N. H. Weste "The Edge Flag Algorithm--A Fill Method for Raster Scan Display" IEEE Trans. on Comp. Vol. C-30 No. 1, January 1981. This method is disadvantageous in that this requires long processing time since it is necessary to refer to the lattice dot information other than the scan line to remove the particular dots.
For high speed displaying, the raster scan type CRT requires a refresh memory so as to be accessible in parallel to plural dots arranged in X-direction (the direction of the raster scan) in the refresh memory, and generates a video signal after the parallel-serial conversion of the readout plural dots. If the filling is effected in the X-direction for the refresh memory of such a memory construction, only one specific dot of the readout plural dots is filled at a time, but plural dots can not be filled in parallel. This disadvantageously impedes high speed filling.
Further, when another shape overlaps the shape as, for example, shown in FIG. 1 at portion, the contour of the shape previously generated is erased due to filling of a new shape.